Part Number Hot Search : 
N4001 TDA4863G TMP87 CEU20P06 HD74LS20 32M61 EC3CB14 34286G2
Product Description
Full Text Search
 

To Download 68HC05C5 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  hc05c5grs/d rev 1.2 68HC05C5 specification (general release) august 29, 1994 csic system design group austin, texas f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page iii mc68HC05C5 specification release 1.2 table of contents section 1 introduction .............................................................. 1 1.1 general...................................................................................1 1.2 features.................................................................................1 1.3 mask options ........................................................................2 1.4 signal description .............................................................3 1.4.1 v dd and v ss ........................................................................3 1.4.2 pe..........................................................................................3 1.4.3 irq ........................................................................................3 1.4.4 osc1 and osc2 .................................................................3 1.4.5 reset ..................................................................................3 1.4.6 tcap.....................................................................................3 1.4.7 pa0-pa7................................................................................3 1.4.8 pb0-pb7................................................................................4 1.4.9 pc0-pc7 ...............................................................................4 1.4.10 pd0-pd7 ...............................................................................4 section 2 operating modes ...................................................... 5 2.1 single-chip mode .................................................................5 2.2 self-check mode .................................................................6 section 3 memory ......................................................................... 9 3.1 rom .........................................................................................11 3.2 ram..........................................................................................11 3.3 eeprom ..................................................................................11 3.3.1 programming register $1c .....................................11 3.3.2 programming/erasing procedures .....................13 section 4 cpu core..................................................................... 15 4.1 registers .............................................................................15 4.1.1 accumulator (a) ...........................................................15 4.1.2 index register (x) ........................................................16 4.1.3 program counter (pc)...............................................16 4.1.4 stack pointer (sp) .......................................................16 4.1.5 condition code register (ccr) ..............................16 4.2 instruction set .................................................................17 4.2.1 register/memory instructions .............................17 4.2.2 read-modify-write instructions ..........................18 4.2.3 branch instructions .................................................19 4.2.4 bit manipulation instructions ...............................20 4.2.5 control instructions ...............................................20 4.3 addressing modes............................................................21 4.3.1 immediate ........................................................................21 4.3.2 direct ...............................................................................21 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page iv motorola mc68HC05C5 specification release 1.2 4.3.3 extended ........................................................................ 21 4.3.4 relative........................................................................... 21 4.3.5 indexed, no offset ..................................................... 22 4.3.6 indexed, 8-bit offset .................................................. 22 4.3.7 indexed, 16-bit offset ................................................ 22 4.3.8 bit set/clear ................................................................. 22 4.3.9 bit test and branch ................................................... 22 4.3.10 inherent.......................................................................... 23 4.4 resets ................................................................................... 23 4.4.1 power-on reset (por)................................................ 23 4.4.2 reset pin ......................................................................... 24 4.4.3 computer operating properly (cop) reset..... 24 4.5 interrupts .......................................................................... 24 4.5.1 hardware controlled interrupt sequence... 25 4.5.2 software interrupt (swi) ........................................ 25 4.5.3 external interrupt ................................................... 25 4.5.4 timer interrupt ........................................................... 26 4.6 low-power modes ............................................................ 28 4.6.1 stop .................................................................................. 28 4.6.2 wait ................................................................................... 29 section 5 input/output ports ................................................31 5.1 port a .................................................................................... 31 5.2 port b .................................................................................... 31 5.3 port c .................................................................................... 31 5.4 port d .................................................................................... 31 5.5 input/output programming .......................................... 32 section 6 timer.............................................................................33 6.1 introduction ...................................................................... 33 6.2 counter................................................................................ 34 6.3 output compare register ............................................ 34 6.4 input capture register ................................................. 35 6.5 timer control register (tcr) $12............................... 35 6.6 timer status register (tsr) $13 .................................. 37 6.7 timer during wait mode ................................................. 38 6.8 timer during stop mode................................................. 38 section 7 simple serial input/output port......................39 7.1 signal format .................................................................... 39 7.1.1 sck..................................................................................... 39 7.1.2 sdo .................................................................................... 39 7.1.3 sdi ...................................................................................... 40 7.2 siop registers ................................................................... 40 7.2.1 siop control register (scr)................................... 40 7.2.2 siop status register (ssr) ...................................... 42 7.2.3 siop data register (sdr)........................................... 42 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page v mc68HC05C5 specification release 1.2 section 8 computer operating properly........................ 43 8.1 introduction ......................................................................43 8.2 resetting the cop ............................................................43 8.3 cop test features............................................................43 8.4 cop during wait mode .....................................................43 8.5 cop during stop mode ....................................................43 section 9 electrical specifications.................................. 45 9.1 maximum ratings ...............................................................45 9.2 thermal characteristics..............................................45 9.3 dc electrical characteristics ..................................46 9.4 control timing...................................................................47 9.5 siop timing............................................................................49 section 10 mechanical specifications ............................... 51 10.1 40-pin dual inline package .............................................51 10.2 44-pin plcc package..........................................................52 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page vii mc68HC05C5 specification rev. 1.2 list of figures figure 1-1: self-check mode schematic for the mc68HC05C5 .................................2 figure 2-1: single-chip mode pinout of the mc68HC05C5........................................6 figure 2-2: self-check mode schematic for the mc68HC05C5 .................................7 figure 3-1: the 8k memory map of the mc68HC05C5 ..............................................9 figure 3-2: i/o registers for the mc68HC05C5 .......................................................10 figure 3-3: programming register ............................................................................11 figure 4-1: programming model ...............................................................................15 figure 4-2: stacking order ........................................................................................15 figure 4-3: power-on reset and reset .................................................................23 figure 4-4: interrupt flowchart ..................................................................................27 figure 4-5: stop recovery timing diagram ..............................................................28 figure 4-6: stop/wait flowcharts..........................................................................29 figure 5-1: port i/o circuitry .....................................................................................32 figure 6-1: timer block diagram ..............................................................................33 figure 6-2: timer control register............................................................................35 figure 6-3: timer status register .............................................................................37 figure 7-1: siop block diagram ...............................................................................39 figure 7-2: serial i/o port timing (cpol=1) ............................................................40 figure 7-3: serial i/o port timing (cpol=0) ............................................................40 figure 7-4: siop control register ............................................................................40 figure 7-5: siop status register..............................................................................42 figure 7-6: siop data register ................................................................................42 figure 9-1: stop recovery timing diagram ..............................................................48 figure 9-2: lvpi timing diagram..............................................................................48 figure 9-3: siop timing diagram .............................................................................49 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page ix mc68HC05C5 specification rev. 1.2 list of tables table 2-1: operating mode conditions...................................................................5 table 3-1: erase mode select ..............................................................................12 table 4-1: vector address for interrupts and reset .............................................25 table 5-1: i/o pin functions .................................................................................32 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 1 section 1: introduction mc68HC05C5 specification rev. 1.2 section 1 introduction 1.1 general the mc68HC05C5 is a 40-pin device based on the mc68hc05p7. the memory map includes 5184 bytes of user rom, 176 bytes of ram, and 128 bytes of eeprom. the mcu has four 8-bit i/o ports: a, b, c and d. port c has high sink current capability. the mc68HC05C5 includes a simple serial i/o peripheral (siop), 16-bit timer, and an on- chip computer operating properly (cop) watchdog circuit. 1.2 features ? hc05 core ? 40-pin dip or 44-pin plastic-leaded chip carrier (plcc) package ? on-chip oscillator with resistor capacitor (rc) or crystal/ceramic resonator mask options ? 5184 bytes of user rom ? 176 bytes of on-chip ram ? 128 bytes of eeprom ? eeprom low voltage program inhibit (lvpi) ? hardware eeprom program enable ? 16-bit timer ? cop watchdog timer mask option ? 32 bidirectional i/o lines ? single-chip mode ? self-check mode ? power-saving stop and wait modes ? edge-sensitive or edge and level-sensitive interrupt trigger mask option ? simple serial input/output port ? 10 ma sink capability on one 8-bit port f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 2 section 1: introduction mc68HC05C5 specification rev. 1.2 figure 1-1: self-check mode schematic for the mc68HC05C5 1.3 mask options there are five mask options on the mc68HC05C5: clock (rc or crystal), irq (edge- sensitive only or edge and level-sensitive), siop (msb or lsb first), cop watchdog timer (enable/disable) and lvpi (enable/disable). pb0 pb1 pb2 pb3 pb4 sdo/pb5 sdi/pb6 sck/pb7 accumulator index register condition code register stack pointer program counter high program counter low cpu control alu cpu oscillator and divide by ? 2 data dir reg port b reg port b i/o lines internal processor clock resetreset irq osc1 osc2 timer system cop system 5184 x 8 user rom 176 x 8 ram 368 x 8 self-check rom 128 x 8 eeprom pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 data dir reg port a reg port a i/o lines pc0 pc1 pc2 pc3 pc4 pc5 pc6 pc7 data dir reg port c reg port c i/o lines pd0 pd1 pd2 pd3 pd4 pd5 pd6/tcmp pd7 data dir reg port d reg port d i/o lines tcap siop pe f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 3 section 1: introduction mc68HC05C5 specification rev. 1.2 note: negative true signals like reset and irq will be denoted with either an asterisk or an overline. 1.4 signal description 1.4.1 v dd and v ss power is supplied to the microcontroller using these two pins. v dd is the positive supply, and v ss is ground. 1.4.2 pe pe is the program enable for the eeprom. this pin has a very weak internal pullup. if this pin is held at a logic "1" level or left not connected, the eeprom can be programmed and erased. if this pin is held at a logic "0" level, eeprom programming and erasing is disabled. the pullup will not be able to pull the pin high if any circuit is connected to pe. 1.4.3 irq this pin has a mask option that provides two different choices of interrupt triggering sensitivity. the irq pin contains an internal schmitt trigger as part of its input to improve noise immunity. refer to 4.5 interrupts for more detail. 1.4.4 osc1 and osc2 these pins provide control input for an on-chip clock oscillator circuit. a crystal, a ceramic resonator, a resistor/capacitor combination, or an external signal connects to these pins providing a system clock. a mask option selects either a crystal/ceramic resonator or a resistor/capacitor as the frequency determining element. the oscillator frequency is two times the internal bus rate. 1.4.5 reset this active low pin is used to reset the mcu to a known start-up state by pulling reset low. the reset pin contains an internal schmitt trigger as part of its input to improve noise immunity. 1.4.6 tcap this pin controls the input capture feature for the on-chip programmable timer. the tcap pin contains an internal schmitt trigger as part of its input to improve noise immunity. 1.4.7 pa0-pa7 these eight i/o lines comprise port a. the state of any pin is software programmable and all port a lines are configured as input during power-on or reset. refer to 5.5 input/ output programming for a detailed description of i/o programming. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 4 section 1: introduction mc68HC05C5 specification rev. 1.2 1.4.8 pb0-pb7 these eight i/o lines comprise port b. the state of any pin is software programmable and all port b lines are configured as input during power-on or reset. refer to 5.5 input/ output programming for a detailed description of i/o programming. three of the port b pins (pb5-pb7) are shared with the siop subsystem. refer to section 7 simple serial input/output port for a detailed description of the siop. 1.4.9 pc0-pc7 these eight i/o lines comprise port c. the state of any pin is software programmable and all port c lines are configured as input during power-on or reset. refer to 5.5 input/ output programming for a detailed description of i/o programming. 1.4.10 pd0-pd7 these eight i/o lines comprise port d. the state of any pin is software programmable and all port d lines are configured as input during power-on or reset. refer to 5.5 input/ output programming for a detailed description of i/o programming. pd6 is shared with tcmp. refer to section 6 timer for more information on the tcmp pin. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 5 section 2: operating modes mc68HC05C5 specification rev. 1.2 section 2 operating modes the mcu has two modes of operation: single-chip mode and self-check mode. table 2-1 shows the conditions required to go into each mode, where v tst = 2 x v dd . table 2-1: operating mode conditions 2.1 single-chip mode in single-chip mode, the address and data buses are not available externally, but there are four 8-bit i/o ports. this mode allows the mcu to function as a self-contained microcontroller, with maximum use of the pins for on-chip peripheral functions. all address and data activity occurs within the mcu. single-chip mode is entered on the rising edge of reset if the irq pin is within normal operating range. reset irq tcap mode v ss to v dd v dd single-chip self-check v ss to v dd v tst f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 6 section 2: operating modes mc68HC05C5 specification rev. 1.2 2.2 self-check mode the self-check program resides at mask rom location $1e80 to $1fef. this program is designed to check the parts functionality with a minimum of support hardware. the self-check mode is entered on the rising edge of reset if the irq pin is at v tst volts and the tcap pin is at logic one. reset must be held low for 4064 cycles after power-on reset (por), or for a time t rl for any other reset. after reset, the i/o, ram, rom, timer, siop and interrupts are tested. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 27 28 29 30 31 32 33 34 35 36 37 38 39 40 v dd osc1 osc2 tcap pd7 pd6/tcmp pd5 pd4 pd3 pd2 pd1 pd0 pc0 pc1 reset irq pe pa7 pa5 pa4 pa3 pa2 pa1 pa0 pb0 pb1 pb2 pa6 figure 2-1: single-chip mode pinout of the mc68HC05C5 15 16 17 18 19 20 pb4 sdo/pb5 sdi/pb6 sck/pb7 v ss pb3 21 22 23 24 25 26 pc2 pc3 pc4 pc5 pc6 pc7 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 7 section 2: operating modes mc68HC05C5 specification rev. 1.2 10 k w v dd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 27 28 29 30 31 32 33 34 35 36 37 38 39 40 15 16 17 18 19 20 21 22 23 24 25 26 v dd 10 k w 10 k w 2n3904 4.7 k w reset irq pa5 pa4 pa3 pa2 pa1 pa0 pb0 pa6 pb1 pb2 pe pa7 pb3 pb4 pb5 pb6 pb7 v ss 1 m f 20 pf 10 m w 4 mhz 20 pf pc0 v dd osc1 osc2 tcap pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 pc1 pc2 pc3 pc4 pc5 pc6 pc7 v dd v tst figure 2-2: self-check mode schematic for the mc68HC05C5 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 8 section 2: operating modes mc68HC05C5 specification rev. 1.2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 9 section 3: memory mc68HC05C5 specification rev. 1.2 section 3 memory the mc68HC05C5 has an 8 k-byte memory map, consisting of user rom, user ram, self-check rom, eeprom, and i/o. see figure 3-1 and figure 3-2 . eeprom 128 bytes ram 176 bytes stack 64 bytes self-check vectors self-check rom 368 bytes user vectors 16 bytes i/o 32 bytes 0000 0032 0080 0192 0256 0384 2688 7808 8160 8176 8191 $0000 $0020 $0050 $00c0 $0100 $0180 $0a80 $1e80 $1fe0 $1ff0 $1fff figure 3-1: the 8k memory map of the mc68HC05C5 user rom 48 bytes unused 2304 bytes user rom 5120 bytes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 10 section 3: memory mc68HC05C5 specification rev. 1.2 figure 3-2: i/o registers for the mc68HC05C5 7 543210 6 address 0000 to 001f $00 port a data $01 port b data $02 port c data $03 port d data $06 port c ddr $07 port d ddr -- -- -- -- -- -- -- -- $08 unused 0 0 mstr cpol 0 0 0 spe $0a serial ctrl spif 000000 dcol $0b serial stat $0c serial data -- -- -- -- -- -- -- -- $0d unused -- -- -- -- -- -- -- -- $0e unused -- -- -- -- -- -- -- -- $0f unused -- -- -- -- -- -- -- -- $10 unused -- -- -- -- -- -- -- -- $11 unused icie toie 0 0 coe iedg olvl ocie $12 timer control icf tof00000 ocf $13 timer status $14 capture high $04 port a ddr $05 port b ddr -- -- -- -- -- -- -- -- $09 unused data $16 compare high $17 compare low $18 counter high $19 counter low $1a dual tm high $1b dual tm low -- romon iooff -- copon tcnt ramon mscan $1f test register lvpi 0 er1 er0 latch eerc eepgm cpen $1c program reg -- -- -- -- -- -- -- -- $1d unused -- -- -- -- -- -- -- -- $1e unused $15 capture low f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 11 section 3: memory mc68HC05C5 specification rev. 1.2 3.1 rom the user rom consists of 48 bytes of page zero rom from $0020 to $004f, 5120 bytes of rom from $0a80 to $1e7f and 16 bytes of user vectors from $1ff0 to $1fff. the self-check rom and vectors are located from $1e80 to $1fef. eight of the user vectors, $1ff8 through $1fff, are dedicated to reset and interrupt vectors. the remaining eight locations, $1ff0 through $1ff7, are general purpose user rom locations. 3.2 ram the user ram consists of 176 bytes of a shared stack area. the stack begins at address $00ff. the stack pointer can access 64 bytes of ram in the range $00ff to $00c0. see 4.1.4 stack pointer (sp) . note: using the stack area for data storage or temporary work locations requires care to prevent it from being overwritten due to stacking from an interrupt or subroutine call. 3.3 eeprom the eeprom on this device is 128 bytes long and is located at address $0100. programming the eeprom can be done by the user on a single byte basis by manipulating the programming register, located at address $001c. 3.3.1 programming register $1c the contents and use of the programming register are discussed below. this device includes low-voltage programming inhibit (lvpi) circuitry which inhibits the use of the programming register when the supply voltage (v dd ) falls below v lvpi . 3.3.1.1 lvpi - low-voltage programming inhibit lvpi is automatically set and cleared by the lvpi circuit and is not writable. the bit is set when v dd falls below v lvpi and is cleared when v dd is above v lvpr . note that the v dd rise and fall slew rates (t vddr and t vddf ) must be within the specification for proper lvpi operation. if the specification is not met, the circuit will operate properly lvpi 0 er1 er0 latch eerc eepgm cpen $1c 0 000000 0 reset: figure 3-3: : programming register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 12 section 3: memory mc68HC05C5 specification rev. 1.2 following a delay of v dd /slew rate. when set, lvpi clears bits 0 through 6 in the programming register to disable the charge pump and prevent programming. cpen cannot be set when lvpi is set. during reset, lvpi is set until v dd reaches v lvpi , at which time it is cleared. the lvpi circuitry continues to function while the processor is in stop mode. the lvpi function is a mask option. if this function is disabled, bit 7 will be set to a value of "0". 3.3.1.2 cpen - charge pump enable when set, cpen enables the charge pump which produces the internal eeprom programming voltage. this bit should be set concurrently with the latch bit. the programming voltage will not be available until eepgm is set. the charge pump should be disabled when not in use. this bit is automatically cleared by the lvpi circuit when lvpi is set, and cannot be set until lvpi is cleared. cpen is readable and writable and is cleared by reset. 3.3.1.3 er1:er0 - erase select bits er1 and er0 form a 2-bit field which is used to select one of three erase modes: byte, block, or bulk. table 3-1 shows the modes selected for each bit configuration. these bits are automatically cleared when lvpi is set. these bits are readable and writable and are cleared by reset. in byte erase mode, only the selected byte is erased. in block mode, a 32-byte block of eeprom is erased. the eeprom memory space is divided into four 32-byte blocks ($100-$11f, $120-$13f, $140-$15f, $160-$17f), and doing a block erase to any address within a block will erase the entire block. in bulk erase mode, the entire 128-byte eeprom section is erased. table 3-1: erase mode select 3.3.1.4 latch when set, latch configures the eeprom address and data bus for programming. when latch is set, writes to the eeprom array cause the data bus and the address bus to be latched. this bit is readable and writable, but reads from the array are inhibited if the latch bit is set and a write to the eeprom space has taken place. when clear, 1 er1 0 0 1 1 bulk erase er0 mode 0 program (no erase) 1 byte erase 0 block erase f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 13 section 3: memory mc68HC05C5 specification rev. 1.2 address and data buses are configured for normal operation. latch is automatically cleared when lvpi is set. reset clears this bit. 3.3.1.5 eerc - eeprom rc oscillator control when this bit is set, the eeprom section uses the internal rc oscillator instead of the cpu clock. after setting the eerc bit, delay a time t rcon to allow the rc oscillator to stabilize. this bit is readable and writable and should be set by the user when the internal bus frequency falls below 1.5 mhz. eerc is automatically cleared when lvpi is set. reset clears this bit. 3.3.1.6 eepgm - eeprom programming power enable eepgm must be written to enable (or disable) the eepgm function. when set, eepgm turns on the charge pump and enables the programming (or erasing) power to the eeprom array. when clear, this power is switched off. this will enable pulsing of the programming voltage to be controlled internally. this bit can be read at any time, but can only be written to if latch = 1. if latch is not set, then eepgm cannot be set. latch and eepgm can not both be set with one write if latch is cleared. eepgm is automatically cleared when lvpi is set. eepgm is automatically cleared when latch is cleared. reset clears this bit. 3.3.2 programming/erasing procedures to program a byte of eeprom, set latch = cpen = 1, set er1 = er0 = 0, write data to the desired address and then set eepgm for a time t epgm . note: any bit should be erased before it is programmed. however, if write/ erase cycling is a concern, a procedure can be followed to minimize the cycling of each bit in each eeprom byte. here is the procedure: ? if pb?eb* = 0, then program the new data over the existing data without erasing it first ? if pb?eb* 1 0, then erase byte before programming ? where pb = byte data to be programmed and eb = existing eeprom byte data. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 14 section 3: memory mc68HC05C5 specification rev. 1.2 to erase a byte of eeprom, set latch = 1, cpen = 1, er1 = 0 and er0 = 1, write to the address to be erased, and set eepgm for a time t ebyt . to erase a block of eeprom, set latch = 1, cpen = 1, er1 = 1 and er0 = 0, write to any address in the block, and set eepgm for a time t eblock . for a bulk erase, set latch = 1, cpen = 1, er1 = 1, and er0 = 1, write to any address in the array, and set eepgm for a time t ebulk . to terminate the programming or erase sequence, clear eepgm, delay for a time t fpv to allow the program voltage to fall, and then clear latch and cpen to free up the buses. following each erase or programming sequence, clear all programming control bits. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 15 section 4: cpu core mc68HC05C5 specification rev. 1.2 section 4 cpu core 4.1 registers the mcu contains five registers as shown in the programming model of figure 4-1 . the interrupt stacking order is shown in figure 4-2 . 4.1.1 accumulator (a) the accumulator is a general purpose 8-bit register used to hold operands and results of arithmetic calculations or data manipulations. a 70 x 70 hinzc ccr 11 sp 70 pc 12 0 accumulator index register program counter stack pointer condition code register figure 4-1: programming model 0 0 0 0 0 12 index register pcl accumulator condition code register pch 111 70 stack i n t e r r u p t decreasing unstack r e t u r n increasing note: since the stack pointer decrements during pushes, the pcl is stacked first, followed by pch, etc. pulling from the stack is in the reverse order. memory addresses memory addresses figure 4-2: stacking order f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 16 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.1.2 index register (x) the index register is an 8-bit register used for the indexed addressing value to create an effective address. the index register may also be used as a temporary storage area. 4.1.3 program counter (pc) the program counter is a 13-bit register that contains the address of the next byte to be fetched. 4.1.4 stack pointer (sp) the stack pointer contains the address of the next free location on the stack. during an mcu reset or the reset stack pointer (rsp) instruction, the stack pointer is set to location $00ff. the stack pointer is then decremented as data is pushed onto the stack and incremented as data is pulled from the stack. when accessing memory, the seven most significant bits are permanently set to 0000011. these 7 bits are appended to the six least significant register bits to produce and address within the range of $00ff to $00c0. subroutines and interrupts may use up to 64 (decimal) locations. if 64 locations are exceeded, the stack pointer wraps around and loses the previously stored information. a subroutine call occupies two locations on the stack; an interrupt uses five locations. 4.1.5 condition code register (ccr) the ccr is a 5-bit register in which 4 bits are used to indicate the results of the instruction just executed, and the fifth bit indicates whether interrupts are masked. these bits can be individually tested by a program, and specific actions can be taken as a result of their state. each bit is explained in the following paragraphs. 4.1.5.1 half carry (h) this bit is set during add and adc operations to indicate that a carry occurred between bits 3 and 4. 4.1.5.2 interrupt (i) when this bit is set, the timer and external interrupt is masked (disabled). if an interrupt occurs while this bit is set, the interrupt is latched and processed as soon as the interrupt bit is cleared. 4.1.5.3 negative (n) when set, this bit indicates that the result of the last arithmetic, logical, or data manipulation was negative. 4.1.5.4 zero (z) when set, this bit indicates that the result of the last arithmetic, logical, or data manipulation was zero. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 17 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.1.5.5 carry/borrow (c) when set, this bit indicates that a carry or borrow out of the arithmetic logical unit (alu) occurred during the last arithmetic operation. this bit is also affected during bit test and branch instructions and during shifts and rotates. 4.2 instruction set the mcu has a set of 62 basic instructions. they can be divided into five different types: register/memory, read-modify-write, branch, bit manipulation, and control. the following paragraphs briefly explain each type. for more information on the instruction set, refer to the m6805 family users manual (m6805um/ad2) or the mc68hc05c4 technical data (mc68hc05c4/d). 4.2.1 register/memory instructions most of these instructions use two operands. one operand is either the accumulator or the index register. the other operand is obtained from memory using one of the addressing modes. the jump unconditional (jmp) and jump to subroutine (jsr) instructions have no register operand. refer to the following instruction list. multiply function load a from memory load x from memory store a in memory store x in memory add memory to a add memory and carry to a subtract memory subtract memory from a with borrow and memory to a or memory with a exclusive or memory with a arithmetic compare a with memory arithmetic compare x with memory bit test memory with a (logical compare) jump unconditional jump to subroutine mnemonic lda ldx sta stx add adc sub sbc and ora eor cmp cpx bit jmp jsr mul f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 18 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.2.2 read-modify-write instructions these instructions read a memory location or a register, modify or test its contents, and write the modified value back to memory or to the register. the test for negative or zero (tst) instruction is an exception to the read-modify-write sequence since it does not modify the value. do not use these read-modify-write instructions on write-only locations. refer to the following list of instructions. function mnemonic increment inc decrement dec clear clr complement com negate (twos complement) neg rotate left through carry rol rotate right through carry ror logical shift left lsl logical shift right lsr arithmetic shift right asr test for negative or zero tst f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 19 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.2.3 branch instructions this set of instructions branches if a particular condition is met; otherwise, no operation is performed. branch instructions are 2-byte instructions. refer to the following list for branch instructions. function mnemonic branch always bra branch never brn branch if higher bhi branch if lower or same bls branch if carry clear bcc branch if higher or same bhs branch if carry set bcs branch if lower blo branch if not equal bne branch if equal beq branch if half carry clear bhcc branch if half carry set bhcs branch if plus bpl branch if minus bmi branch if interrupt mask bit is clear bmc branch if interrupt mask bit is set bms branch if interrupt line is low bil branch if interrupt line is high bih branch to subroutine bsr f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 20 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.2.4 bit manipulation instructions the mcu is capable of setting or clearing any writable bit which resides in the first 256 bytes of the memory space where all port registers, port ddrs, timer, timer control, and on-chip ram reside. an additional feature allows the software to test and branch on the state of any bit within these 256 locations. the bit set, bit clear and bit test and branch functions are all implemented with a single instruction. for test and branch instructions, the value of the bit tested is also placed in the carry bit of the condition code register. these instructions are also read-modify-write instructions. do not bit manipulate write- only locations. refer to the following list for bit manipulation instructions. 4.2.5 control instructions these instructions are register reference instructions and are used to control processor operation during program execution. refer to the following list for control instructions. function branch if bit n is set branch if bit n is clear set bit n clear bit n mnemonic brset n (n = 0. . .7) brclr n (n = 0. . .7) bset n (n = 0. . .7) bclr n (n = 0. . .7) function transfer a to x transfer x to a set carry bit clear carry bit mnemonic tax txa sec clc set interrupt mask bit sei clear interrupt mask bit cli software interrupt swi return from subroutine rts return from interrupt rti reset stack pointer rsp no-operation nop wait wait stop stop f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 21 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.3 addressing modes the mcu uses ten different addressing modes to provide the programmer with an opportunity to optimize the code for all situations. the various indexed addressing modes make it possible to locate data tables, code conversion tables, and scaling tables anywhere in the memory space. short indexed accesses are single-byte instructions; the longest instructions (3 bytes) permit accessing tables throughout memory. short and long absolute addressing is also included. one or 2-byte direct addressing instructions access all data bytes in most applications. extended addressing permits jump instructions to reach all memory. the term "effective address" (ea) is used to describe the various addressing modes. effective address is defined as the address from which the argument for an instruction is fetched or stored. 4.3.1 immediate in the immediate addressing mode, the operand is contained in the byte immediately following the opcode. the immediate addressing mode is used to access constants that do not change during program execution (for example, a constant used to initialize a loop counter). 4.3.2 direct in the direct addressing mode, the effective address of the argument is contained in a single byte following the opcode byte. direct addressing allows the user to directly address the lowest 256 bytes in memory with a single 2-byte instruction. 4.3.3 extended in the extended addressing mode, the effective address of the argument is contained in the 2 bytes following the opcode byte. instructions with extended addressing mode are capable of referencing arguments anywhere in memory with a single 3-byte instruction. when using the motorola assembler, the user need not specify whether an instruction uses direct or extended addressing. the assembler automatically selects the shortest form of the instruction. 4.3.4 relative the relative addressing mode is only used in branch instructions. in relative addressing, the contents of the 8-bit signed offset byte, which is the last byte of the instruction, is added to the pc if, and only if, the branch conditions are true. otherwise control proceeds to the next instruction. the span of relative addressing is from -128 to +127 from the address of the next opcode. the programmer need not calculate the offset when using the motorola assembler, since it calculates the proper offset and checks to see that it is within the span of the branch. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 22 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.3.5 indexed, no offset in the indexed, no offset addressing mode, the effective address of the argument is contained in the 8-bit index register. this addressing mode can access the first 256 memory locations. these instructions are only 1 byte long. this mode is often used to move a pointer through a table or to hold the address of a frequently referenced ram or i/o location. 4.3.6 indexed, 8-bit offset in the indexed, 8-bit offset addressing mode, the effective address is the sum of the contents of the unsigned 8-bit index register and the unsigned byte following the opcode. this addressing mode is useful for selecting the k th element in an n element table. with this 2-byte instruction, k would typically be in x and the address of the beginning of the table would be in the instruction. as such, tables may begin anywhere within the first 256 addressable locations and could extend as far as location 510 ($01fe). this is the last location which can be accessed in this way. 4.3.7 indexed, 16-bit offset in the indexed, 16-bit offset addressing mode, the effective address is the sum of the contents of the unsigned 8-bit index register and the 2 unsigned bytes following the opcode. this address mode can be used in a manner similar to indexed, 8-bit offset except that this 3-byte instruction allows tables to be anywhere in memory. as with direct and extended addressing, the motorola assembler determines the shortest form of indexed addressing. 4.3.8 bit set/clear in the bit set/clear addressing mode, the bit to be set or cleared is part of the opcode, and the byte following the opcode specifies the direct addressing of the byte in which the specified bit is to be set or cleared. any read/write bit in the first 256 locations of memory, including i/o, can by selectively set or cleared with a single 2-byte instruction. 4.3.9 bit test and branch the bit test and branch addressing mode is a combination of direct addressing and relative addressing. the bit that is to be tested and its condition (set or clear), is included in the opcode. the address of the byte to be tested is in the single byte immediately following the opcode byte. the signed relative 8-bit offset in the third byte is added to the pc if the specified bit is set or cleared in the specified memory location. this single 3- byte instruction allows the program to branch based on the condition of any readable bit in the first 256 locations of memory. the span of branching is from -128 to +127 from the address of the next opcode. the state of the tested bit is also transferred to the carry bit of the condition code register. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 23 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.3.10 inherent in the inherent addressing mode, all the information necessary to execute the instruction is contained in the opcode. operations specifying only the index register and/or accumulator as well as the control instructions with no other arguments are included in this mode. these instructions are 1 byte long. 4.4 resets the mcu can be reset three ways: by the initial power-on reset function, by an active low input to the reset pin, and by a cop watchdog-timer reset. 4.4.1 power-on reset (por) an internal reset is generated upon power-up to allow the internal clock generator to stabilize. the power-on reset is strictly for power turn-on conditions and should not be used to detect a drop in the power supply voltage. there is a 4064 internal processor clock cycle (t cyc ) oscillator stabilization delay after the oscillator becomes active. if the reset pin is low at the end of this 4064-cycle delay, the mcu will remain in the reset condition until reset goes high. reset notes: 1. internal timing signal and bus information not available externally. 2. osc1 line is not meant to represent frequency. it is only used to represent time. 3. the next rising edge of the internal processor clock following the rising edge of reset initiates the reset sequence. osc1 2 internal clock 1 internal address bus 1 v dd internal data bus 1 figure 4-3: power-on reset and reset t rl new pch new pcl op code op code pch pcl 3 t cyc 4064t cyc t vddr dummy 1fff new pc new pc 1ffe 1ffe 1ffe new pc new pc 1ffe 1fff 1ffe dummy f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 24 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.4.2 ` reset pin the mcu is reset when a logic zero is applied to the reset input for a period of one and one-half machine cycles (t cyc ). 4.4.3 computer operating properly (cop) reset the mcu contains a watchdog timer that automatically times out if not reset (cleared) within a specific time by a program reset sequence. if the cop watchdog timer is allowed to time-out, an internal reset is generated to reset the mcu. because the internal reset signal is used, the mcu comes out of a cop reset in the same operating mode it was in when the cop time-out was generated. the cop reset function is enabled or disabled by a mask option. refer to section 8 computer operating properly for more information on the cop watchdog timer. 4.5 interrupts the mcu can be interrupted three different ways: by the two maskable hardware interrupts ( irq and timer) and the nonmaskable software interrupt instruction (swi). interrupts cause the processor to save register contents on the stack and to set the interrupt mask (i bit) to prevent additional interrupts. the rti instruction causes the register contents to be recovered from the stack and normal processing to resume. unlike reset, hardware interrupts do not cause the current instruction execution to be halted, but are considered pending until the current instruction is complete. note: the current instruction is the one already fetched and being operated on. when the current instruction is complete, the processor checks all pending hardware interrupts. if interrupts are not masked (ccr i bit clear) and if the corresponding interrupt enable bit is set, the processor proceeds with interrupt processing; otherwise, the next instruction is fetched and executed. if both an external interrupt and a timer interrupt are pending at the end of an instruction execution, the external interrupt is serviced first. the swi is executed the same as any other instruction, regardless of the i-bit state. table 4-1 lists vector addresses for all interrupts including reset. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 25 section 4: cpu core mc68HC05C5 specification rev. 1.2 table 4-1: vector address for interrupts and reset 4.5.1 hardware controlled interrupt sequence the following three functions ( reset, stop, and wait) are not in the strictest sense interrupts; however, they are acted upon in a similar manner. flowcharts for hardware interrupts are shown in figure 4-4 , and for stop and wait in figure 4-6 . a discussion is provided below. 1. reset - a low input on the reset input pin causes the program to vector to its starting address which is specified by the contents of memory locations $1ffe and $1fff. the i bit in the condition code register is also set. much of the mcu is configured to a known state during this type of reset as previously described in 4.4 resets . 2. stop - the stop instruction causes the oscillator to be turned off and the processor to "sleep" until and external interrupt ( irq) or reset occurs. 3. wait - the wait instruction causes all processor clocks to stop, but leaves the timer clock running. this "rest" state of the processor can be cleared by reset, an external interrupt irq), or timer interrupt. there are no special wait vectors for these individual interrupts. 4.5.2 software interrupt (swi) the swi is an executable instruction and a non-maskable interrupt: it is executed regardless of the state of the i bit in the ccr. if the i bit is zero (interrupts enabled), swi executes after interrupts which were pending when the swi was fetched, but before interrupts generated after the swi was fetched. the interrupt service routine address is specified by the contents of memory locations $1ffc and $1ffd. 4.5.3 external interrupt if the interrupt mask bit (i bit) of the ccr is set, all maskable interrupts (internal and external) are disabled. clearing the i bit enables interrupts. the interrupt request is latched immediately following the falling edge of irq. it is then synchronized internally and serviced as specified by the contents of $1ffa and $1ffb. either a level-sensitive and edge-sensitive trigger or an edge-sensitive-only trigger is available as a mask option. register n/a n/a n/a tsr tsr tsr flag name n/a n/a n/a icf ocf tof interrupts reset software external interrupt timer input capture timer output compare timer overflow cpu interrupt reset swi irq timer timer timer vector address $1ffe-$1fff $1ffc-$1ffd $1ffa-$1ffb $1ff8-$1ff9 $1ff8-$1ff9 $1ff8-$1ff9 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 26 section 4: cpu core mc68HC05C5 specification rev. 1.2 note: the internal interrupt latch is cleared in the first part of the interrupt service routine; therefore, one external interrupt pulse could be latched and serviced as soon as the i bit is cleared. 4.5.4 timer interrupt there are three different timer interrupt flags that cause a timer interrupt whenever they are set and enabled. the interrupt flags are in the timer status register (tsr), and the enable bits are in the timer control register (tcr). any of these interrupts will vector to the same interrupt service routine, located at the address specified by the contents of memory locations $1ff8 and $1ff9. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 27 section 4: cpu core mc68HC05C5 specification rev. 1.2 n restore registers from stack: ccr, a, x, pc irq external interrupt load pc from: swi: $1ffc-$1ffd irq: $1ffa-$1ffb timer: $1ff8-$1ff9 set i bit in cc register stack pc, x, a, ccr clear irq request latch fetch next instruction execute instruction n n figure 4-4: interrupt flowchart y y y n i-bit in ccr set ? internal timer interrupt swi instruction ? n y rti instruction ? y from reset f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 28 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.6 low-power modes 4.6.1 stop the stop instruction places the mcu in its lowest power consumption mode. in stop mode, the internal oscillator is turned off, halting all internal processing, including timer and cop watchdog operation. the rc oscillator is also turned off during stop mode, and is not available for use by the eeprom system. during the stop mode, the tcr bits are altered to remove any pending timer interrupt request and to disable any further timer interrupts. the timer prescaler is cleared. the i bit in the ccr is cleared to enable external interrupts. all other registers and memory remain unaltered. all input/output lines remain unchanged. the processor can be brought out of the stop mode only by an external interrupt or reset. 4.6.1.1 stop recovery the processor can be brought out of the stop mode only by an external interrupt or reset. see figure 4-5 . figure 4-5: stop recovery timing diagram 1ffe 1ffe 1ffe 1ffe 1fff internal address bus internal clock irq 3 irq 2 reset osc1 1 t ilch 4064 t cyc reset or interrupt vector fetch t lih t rl notes: 1. represents the internal gating of the osc1 pin. 2. irq pin edge-sensitive mask option. 3. irq pin level- and edge-sensitive mask option. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 29 section 4: cpu core mc68HC05C5 specification rev. 1.2 4.6.2 wait the wait instruction places the mcu in a low-power consumption mode, but the wait mode consumes more power than the stop mode. all cpu action is suspended, but the timer and the oscillator remain active. any interrupt or reset (including a cop reset) will cause the mcu to exit the wait mode. during the wait mode, the i bit in the ccr is cleared to enable interrupts. all other registers, memory, and input/output lines remain in their previous state. the timer may be enabled to allow a periodic exit from the wait mode. figure 4-6: stop/wait flowcharts y stop oscillator active timer clock active processor clocks stopped clear i bit interrupt ( irq) external reset reset turn on oscillator wait for time delay to stabilize 1. fetch reset vector or 2. service interrupt a.stack b.set i bit c.vector to interrupt routine restart processor clock wait stop oscillator and all clocks clear i bit interrupt timer interrupt ( irq) external 1. fetch reset vector or 2. service interrupt a.stack b.set i bit c.vector to interrupt routine y y y y n n n n n f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 30 section 4: cpu core mc68HC05C5 specification rev. 1.2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 31 section 5: input/output ports mc68HC05C5 specification rev. 1.2 section 5 input/output ports in single-chip mode there are 32 lines arranged as four 8-bit i/o ports. these ports are programmable as either inputs or outputs under software control of the data direction registers. note: to avoid a glitch on the output pins, write data to the i/o port data register before writing a 1 to the corresponding data direction register. 5.1 port a port a is an 8-bit bidirectional port which does not share any of its pins with other subsystems. the port a data register is at $0000 and the data direction register (ddr) is at $0004. reset does not affect the data registers, but clears the data direction registers, thereby returning the ports to inputs. writing a 1 to a ddr bit sets the corresponding port bit to output mode. 5.2 port b port b is an 8-bit bidirectional port. three of the port b pins (pb5 thourgh pb7) are shared with the siop subsystem. refer to section 7 simple serial input/output port for a detailed description of the siop. the port b data register is at $0001 and the data direction register (ddr) is at $0005. reset does not affect the data registers, but clears the data direction registers, thereby returning the ports to inputs. writing a 1 to a ddr bit sets the corresponding port bit to output mode. 5.3 port c port c is an 8-bit bidirectional port which does not share any of its pins with other subsystems. the port c data register is at $0002 and the data direction register (ddr) is at $0006. reset does not affect the data registers, but clears the data direction registers, thereby returning the ports to inputs. writing a 1 to a ddr bit sets the corresponding port bit to output mode. port c has a high current sink capability. to minimize current spikes, these pins should be switched one at a time. 5.4 port d port d is an 8-bit bidirectional port. pd6 is shared with tcmp. if the pd6 pin is configured as tcmp by setting the coe bit in the timer control register, this pin will become an output controlled by the timer subsection. refer to section 6 timer for more information. the port d data register is at $0003 and the data direction register (ddr) is at $0007. reset does not affect the data registers, but clears the data direction f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 32 section 5: input/output ports mc68HC05C5 specification rev. 1.2 registers, thereby returning the ports to inputs. writing a 1 to a ddr bit sets the corresponding port bit to output mode. 5.5 input/output programming port pins may be programmed as inputs or outputs under software control. the direction of the pins is determined by the state of the corresponding bit in the port data direction register (ddr). each port has an associated ddr. any port pin is configured as an output if its corresponding ddr bit is set to a logic one. a pin is configured as an input if its corresponding ddr bit is cleared to a logic zero. at power-on or reset, all ddrs are cleared, which configures all pins as inputs. the data direction registers are capable of being written to or read by the processor. during the programmed output state, a read of the data register actually reads the value of the output data latch and not the i/o pin. refer to table 5-1 and figure 5-1 . table 5-1: i/o pin functions r/ w 0 0 1 1 ddr 0 1 0 1 i/o pin function the i/o pin is in input mode. data is written into the output data latch. data is written into the output data latch and output of the i/o pin. the state of the i/o pin is read. the i/o pin is in an output mode. the output data latch is read. r/w is an internal signal. data direction register bit latched output data bit i/o pin input register bit input i/o output internal hc05 connections figure 5-1: port i/o circuitry f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 33 section 6: timer mc68HC05C5 specification rev. 1.2 section 6 timer 6.1 introduction the timer consists of a 16-bit, software-programmable counter driven by a fixed divide- by-four prescaler. this timer can be used for many purposes, including input waveform measurements while simultaneously generating an output waveform. pulse widths can vary from several microseconds to many seconds. refer to figure 6-1 for a timer block diagram. because the timer has a 16-bit architecture, each specific functional segment (capability) is represented by two registers. these registers contain the high and low byte of that functional segment. generally, accessing the low byte of a specific timer function allows full control of that function; however, an access of the high byte inhibits that specific timer function until the low byte is also accessed. note: the i bit in the ccr should be set while manipulating both the high and low byte register of a specific timer function to ensure that an interrupt does not occur. input capture register clock internal bus output compare register high byte low byte $16 $17 ??? /4 internal processor 16-bit free running counter counter alternate register 8-bit buffer high byte low byte $1a $1b $18 $19 high byte low byte $14 $15 output compare circuit overflow detect circuit edge detect circuit timer status reg. icf ocf tof $13 icie iedg olvl output level reg. reset timer control reg. $12 output level (tcmp) interrupt circuit toie ocie edge input (tcap) d clk c q figure 6-1: timer block diagram f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 34 section 6: timer mc68HC05C5 specification rev. 1.2 6.2 counter the key element in the programmable timer is a 16-bit, free-running counter or counter register, preceded by a prescaler that divides the internal processor clock by four. the prescaler gives the timer a resolution of 2.0 microseconds if the internal bus clock is 2.0 mhz. the counter is incremented during the low portion of the internal bus clock. software can read the counter at any time without affecting its value. the double-byte, free-running counter can be read from either of two locations, $18-$19 (counter register) or $1a-$1b (counter alternate register). a read from only the least significant byte (lsb) of the free-running counter ($19, $1b) receives the count value at the time of the read. if a read of the free-running counter or counter alternate register first addresses the most significant byte (msb) ($18, $1a), the lsb ($19, $1b) is transferred to a buffer. this buffer value remains fixed after the first msb read, even if the user reads the msb several times. this buffer is accessed when reading the free-running counter or counter alternate register lsb ($19 or $1b) and, thus, completes a read sequence of the total counter value. in reading either the free-running counter or counter alternate register, if the msb is read, the lsb must also be read to complete the sequence. the counter alternate register differs from the counter register in one respect: a read of the counter register msb can clear the timer overflow flag (tof). therefore, the counter alternate register can be read at any time without the possibility of missing timer overflow interrupts due to clearing of the tof. the free-running counter is configured to $fffc during reset and is always a read-only register. during a power-on reset, the counter is also preset to $fffc and begins running after the oscillator start-up delay. because the free-running counter is 16 bits preceded by a fixed divided-by-four prescaler, the value in the free-running counter repeats every 262,144 internal bus clock cycles. when the counter rolls over from $ffff to $0000, the tof bit is set. an interrupt can also be enabled when counter rollover occurs by setting its interrupt enable bit (toie). 6.3 output compare register the 16-bit output compare register is made up of two 8-bit registers at locations $16 (msb) and $17 (lsb). the output compare register is used for several purposes, such as indicating when a period of time has elapsed. all bits are readable and writable and are not altered by the timer hardware or reset. if the compare function is not needed, the 2 bytes of the output compare register can be used as storage locations. the output compare register contents are compared with the contents of the free-running counter continually, and if a match is found, the corresponding output compare flag (ocf) bit is set and the corresponding output level (olvl) bit is clocked to an output level register. the output compare register values and the output level bit should be changed after each successful comparison to establish a new elapsed timeout. an interrupt can also accompany a successful output compare provided the corresponding interrupt enable bit (ocie) is set. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 35 section 6: timer mc68HC05C5 specification rev. 1.2 after a processor write cycle to the output compare register containing the msb ($16), the output compare function is inhibited until the lsb ($17) is also written. the user must write both bytes (locations) if the msb is written first. a write made only to the lsb ($17) will not inhibit the compare function. the free-running counter is updated every four internal bus clock cycles. the minimum time required to update the output compare register is a function of the program rather than the internal hardware. the processor can write to either byte of the output compare register without affecting the other byte. the output level (olvl) bit is clocked to the output level register regardless of whether the output compare flag (ocf) is set or clear. 6.4 input capture register two 8-bit registers, which make up the 16-bit input capture register, are read-only and are used to latch the value of the free-running counter after the corresponding input capture edge detector senses a defined transition. the level transition which triggers the counter transfer is defined by the corresponding input edge bit (iedg). reset does not affect the contents of the input capture register except when exiting stop mode. the result obtained by an input capture will be one more than the value of the free-running counter on the rising edge of the internal bus clock preceding the external transition. this delay is required for internal synchronization. resolution is one count of the free-running counter, which is four internal bus clock cycles. the free-running counter contents are transferred to the input capture register on each proper signal transition regardless of whether the input capture flag (icf) is set or clear. the input capture register always contains the free-running counter value that corresponds to the most recent input capture. after a read of the input capture register ($14) msb, the counter transfer is inhibited until the lsb ($15) is also read. this characteristic causes the time used in the input capture software routine and its interaction with the main program to determine the minimum pulse period. a read of the input capture register lsb ($15) does not inhibit the free-running counter transfer since they occur on opposite edges of the internal bus clock. 6.5 timer control register (tcr) $12 the tcr is a read/write register containing six control bits. three bits control interrupts associated with the timer status register flags icf, ocf and tof. figure 6-2: timer control register icie toie 0 0 coe iedg olvl ocie $12 0 0000u0 0 reset: f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 36 section 6: timer mc68HC05C5 specification rev. 1.2 icie - input capture interrupt enable 1 = interrupt enabled 0 = interrupt disabled ocie - output compare interrupt enable 1 = interrupt enabled 0 = interrupt disabled toie - timer overflow interrupt enable 1 = interrupt enabled 0 = interrupt disabled coe - tcmp pin enable 1 = tcmp pin enabled 0 = tcmp pin disabled (pin 35 is pd6) iedg - input edge value of input edge determines which level transition on tcap pin will trigger free-running counter transfer to the input capture register 1 = positive edge 0 = negative edge reset does not affect the iedg bit (u=unaffected). olvl - output level value of output level is clocked into output level register by the next successful output compare and will appear on the tcmp pin 1 = high output 0 = low output bits 3 and 4 - not used always read zero f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 37 section 6: timer mc68HC05C5 specification rev. 1.2 6.6 timer status register (tsr) $13 the tsr is a read-only register containing three status flag bits. icf - input capture flag 1 = flag set when selected polarity edge is sensed by input capture edge detector 0 = flag cleared when tsr and input capture low register ($15) are accessed ocf - output compare flag 1 = flag set when output compare register contents match the free-running counter contents 0 = flag cleared when tsr and output compare low register ($17) are accessed tof - timer overflow flag 1 = flag set when free-running counter transition from $ffff to $0000 occurs 0 = flag cleared when tsr and counter low register ($19) are accessed bits 0-4 - not used always read zero accessing the timer status register satisfies the first condition required to clear status bits. the remaining step is to access the register corresponding to the status bit. a problem can occur when using the timer overflow function and reading the free-running counter at random times to measure an elapsed time. without incorporating the proper precautions into software, the timer overflow flag could unintentionally be cleared if: 1) the timer status register is read or written when tof is set, and 2) the lsb of the free-running counter is read but not for the purpose of servicing the flag. the counter alternate register at address $1a and $1b contains the same value as the free-running counter (at address $18 and $19); therefore, this alternate register can be read at any time without affecting the timer overflow flag in the timer status register. icf tof00000 ocf $13 u u00000 u reset: figure 6-3: timer status register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 38 section 6: timer mc68HC05C5 specification rev. 1.2 6.7 timer during wait mode the cpu clock halts during the wait mode, but the timer remains active. if interrupts are enabled, a timer interrupt will cause the processor to exit the wait mode. 6.8 timer during stop mode in the stop mode, the timer stops counting and holds the last count value if stop is exited by an interrupt. if reset is used, the counter is forced to $fffc. during stop, if at least one valid input capture edge occurs at the tcap pin, the input capture detect circuit is armed. this does not set any timer flags nor wake up the mcu, but when the mcu does wake up, there is an active input capture flag and data from the first valid edge that occurred during the stop mode. if reset is used to exit stop mode, then no input capture flag or data remains, even if a valid input capture edge occurred. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 39 section 7: simple input/output port mc68HC05C5 specification rev. 1.2 section 7 simple serial input/output port this device includes a simple synchronous serial i/o port (siop). the siop is a three- wire master/slave system including serial clock (sck), serial data input (sdi), and serial data output (sdo). a mask programmable option determines whether the siop is msb or lsb first. 7.1 signal format 7.1.1 sck the state of sck between transmissions must be logic 1 for cpol set and logic 0 for cpol clear. the first transition of sck signals the beginning of a transmission. at this time, the first bit of received data is accepted at the sdi pin and the first bit of transmitted data is presented at the sdo pin. data is captured at the sdi pin on the rising edge of sck. subsequent falling edges shift the data and accept or present the next bit. the transmission is ended upon the eighth rising edge of sck. the maximum frequency of sck in slave mode is equal to e (bus clock) divided by 4. that is for a 4 mhz oscillator input e becomes 2 mhz and the maximum sck frequency is 500 khz. there is no minimum sck frequency. in master mode, the format is identical except that the sck pin is an output and the shift clock now originates internally. the master mode transmission frequency is fixed at e/4. 7.1.2 sdo a mask programmable option will be included to allow data to be transmitted in either msb first format or lsb first format. in either case, the state of the sdo pin will always reflect the value of the first bit received on the previous transmission if there was one. upon enabling the siop, sdo will always be driven to a logic one by the siop subsystem. figure 7-1: siop block diagram 8-bit shift register d q r c reset sdo sck sdi msb/lsb mask option data bus f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 40 section 7: simple input/output port mc68HC05C5 specification rev. 1.2 while the siop is enabled, pb5 can not be used as a standard output since that pin is coupled to the last stage of the serial shift register. if cpol is set, the first falling edge of sck will shift the first data bit out to the output pin. if cpol is clear, the first data bit will be on the sdo pin waiting for the transmission. 7.1.3 sdi the sdi pin becomes an input as soon as the siop is enabled. new data may be presented to the sdi pin on the falling edge of sck. valid data must be present at least t s before the rising edge of the clock and remain valid for t h after the edge. figure 7-2: serial i/o port timing (cpol=1) figure 7-3: serial i/o port timing (cpol=0) 7.2 siop registers 7.2.1 siop control register (scr) this register is located at address $000a and contains 3 bits. sdo bit 1 bit 2 bit 3 bit 7 sck bit 8 sdi bit 1 bit 2 bit 3 bit 7 bit 8 sdo bit 1 bit 2 bit 3 bit 7 sck bit 8 sdi bit 1 bit 2 bit 3 bit 7 bit 8 0 0 mstr cpol 0 0 0 spe $0a 0 001000 0 reset: figure 7-4: siop control register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 41 section 7: simple input/output port mc68HC05C5 specification rev. 1.2 7.2.1.1 spe - serial peripheral enable when set, this bit enables the serial i/o port and initializes the port b ddr such that pb5 (sdo) is output, pb6 (sdi) is input and pb7 (sck) is input (slave mode only). the port b ddr can be subsequently altered as the application requires and the port b data register (except for pb5) can be manipulated as usual. however, these actions could affect the transmitted or received data. when spe is cleared, port b reverts to standard parallel i/o without affecting the port b data register or ddr. spe is readable and writable any time but clearing spe while a transmission is in progress will abort the transmission, reset the bit counter, and return port b to its normal i/o function. reset clears this bit. 7.2.1.2 mstr - master mode when set, this bit configures the siop for master mode. this means that the transmission is initiated by a write to the data register and the sck pin becomes an output providing a synchronous data clock at a fixed rate of e (bus clock) divided by 4. while the device is in master mode, the sdo and sdi pins do not change function. these pins behave exactly as they would in slave mode. reset clears this bit and configures the siop for slave operation. mstr may be set at any time regardless of the state of spe. clearing mstr will abort any transmission in progress. 7.2.1.3 cpol - clock polarity the clock polarity bit controls the sck polarity between transmissions. when this bit is cleared, sck will be low between transmissions. when this bit is set, sck will be high between transmissions. in both cases, the data is latched on the rising edge of sck for serial input and is valid on the rising edge of sck for serial output. reset sets this bit. when using the clock polarity low mode (cpol=0), the proper mode should be entered before enabling the serial system. the cpol bit should be cleared first. then the spe bit should be set during a second write to the scr. the following example shows a proper sequence. * for master mode cpol=0 lda#$00 stascrclear cpol lda#$50 stascrset mstr, set spe * for slave mode cpol=0 lda#$00 stascrclear cpol lda#$40 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 42 section 7: simple input/output port mc68HC05C5 specification rev. 1.2 stascrset spe 7.2.2 siop status register (ssr) this register is located at address $000b and contains only 2 bits. 7.2.2.1 spif - serial peripheral interface flag this bit is set upon occurrence of the last rising clock edge if cpol is set and the last falling clock edge of cpol is clear to indicates that a data transfer has taken place. it has no effect on any further transmissions and can be ignored without problem. spif is cleared by reading the ssr with spif set followed by a read or write of the serial data register. if spif is cleared before the last edge of the next byte, it will be set again. reset clears this bit. 7.2.2.2 dcol - data collision this is a read-only status bit which indicates that an invalid access to the data register has been made. this can occur any time after the first falling edge of sck if cpol is set and after the first rising edge of sck if cpol is clear and before spif is set. a read or write of the data register during this time will result in invalid data being transmitted or received. dcol is cleared by reading the status register with spif set followed by a read or write of the data register. if the last part of the clearing sequence is done after another transmission has been started, dcol will be set again. reset also clears this bit. 7.2.3 siop data register (sdr) this register is located at address $000c and is both the transmit and receive data register. this system is not double buffered and any write to this register will destroy the previous contents. the sdr can be read at any time, but if a transmission is in progress the results may be ambiguous. writes to the sdr while a transmission is in progress can cause invalid data to be transmitted and/or received. this register can be read and written only when the siop is enabled (spe=1). spif 000000 dcol $0b 0 000000 0 reset: figure 7-5: siop status register $0c u uuuuuu u reset: figure 7-6: siop data register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 43 section 8: computer operating properly mc68HC05C5 specification rev. 1.2 section 8 computer operating properly 8.1 introduction this device includes a "watchdog" computer operating properly (cop) feature as a mask option. the cop is implemented with an 18-bit ripple counter. this provides a timeout period of 64 milliseconds at a bus rate of 2 mhz. if the cop should timeout, a system reset will occur and the device will be re-initialized in the same fashion as a por or external reset. 8.2 resetting the cop preventing a cop reset is done by writing a "0" to the copf bit. this action will reset the counter and begin the timeout period again. the copf bit is bit 0 of address $1ff0. a read of address $1ff0 will result in the user defined rom data at that location. 8.3 cop test features for speeding up the cop test, a feature was added in the self-check mode to split the 18-bit counter into 6-bit and 12-bit counters clocked in parallel where the output of the 6- bit counter drives the cop logic. splitting the counter is accomplished by writing a "1" to bit 7 of $1ff0. writing a "0" to bit 7 of $1ff0 will reconnect the two halves of the cop counter. 8.4 cop during wait mode the cop will continue to operate normally during wait mode. the software should pull the device out of wait mode periodically and reset the cop by writing to the copf bit to prevent a cop reset. 8.5 cop during stop mode stop mode disables the oscillator circuit and thereby turns the clock off for the entire device. the cop counter will be reset when stop mode is entered. if a reset is used to exit stop mode, the cop counter will be reset after the 4064 cycles of delay after stop mode. if an irq is used to exit stop mode, the cop counter will not be reset after the 4064-cycle delay and will have that many cycles already counted when control is returned to the program. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 44 section 8: computer operating properly mc68HC05C5 specification rev. 1.2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 45 section 9: electrical specifications mc68HC05C5 specification rev. 1.2 section 9 electrical specifications 9.1 maximum ratings (voltages referenced to v ss ) this device contains circuitry to protect the inputs against damage due to high static voltages or electric fields; however, it is advised that normal precautions be taken to avoid application of any voltage higher than maximum-rated voltages to this high-impedance circuit. for proper operation, it is recommended that v in and v out be constrained to the range v ss (v in or v out ) v dd . reliability of operation is enhanced if unused inputs are connected to an appropriate logic voltage level (for example, either v ss or v dd ). 9.2 thermal characteristics supply voltage unit value symbol rating v -0.3 to +7.0 v dd input voltage v ss - 0.3 to v in v self-check mode ( irq pin only) v ss - 0.3 to v v in current drain per pin excluding v dd and v ss 25 ma i operating temperature range t l to t h c t a 0 to +70 mc68HC05C5p (standard) v dd + 0.3 2 v dd + 0.3 storage temperature range -65 to +150 c t stg mc68HC05C5cp (extended) -40 to +85 thermal resistance 60 plastic dip c/w q ja unit value symbol characteristic 70 plastic leaded chip carrier c/w q ja f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 46 section 9: electrical specifications mc68HC05C5 specification rev. 1.2 9.3 dc electrical characteristics (v dd = 5.0 vdc 10%, v ss = 0 vdc, t a = -40 c to +85 c, unless otherwise noted) notes: 1. all values shown reflect average measurements. 2. typical values at midpoint of voltage range, 25 c only unless otherwise noted. 3. wait i dd : only timer system active. 4. run (operating) i dd , wait i dd : measured using external square wave clock source (f osc = 4.2 mhz), all inputs 0.2v from rail; no dc loads, less than 50 pf on all outputs, c l = 20 pf on osc2. 5. wait, stop i dd : all ports configured as inputs, v il = 0.2 v, v ih = v dd -0.2 v. 6. stop i dd measured with osc1 = v ss . is affected linearly by the osc2 capacitance. stop with lvpi disabled 50 2 i dd m a 25 c 140 5 i dd m a -40 c to +85 c i load = -10.0 m a output voltage i load = 10.0 m a unit max typ min symbol characteristic v 0.1 v ol v dd -0.1 v oh output high voltage v dd -0.8 v oh (i load = -0.8 ma) pa0-7, pb0-7,pc0-7,pd0-7 v output low voltage 0.4 v ol (i load = 1.6 ma) pa0-7, pb0-7,pd0-7 v input high voltage v dd v ih pa0-7, pb0-7,pc0-7, pd0-7, irq,reset,osc1, tcap v 0.7 v dd supply current (see notes) 7.0 3.0 i dd ma run 4.0 1.0 i dd ma wait stop with lvpi enabled 300 200 i dd m a 25 c 300 200 i dd m a -40 c to +85 c i/o ports hi-z leakage current 10 i oz pa0-7, pb0-7,pc0-7,pd0-7 m a input current 1 i in reset, irq, osc1,tcap, pe m a capacitance 12 c out ports (as input or output) pf reset, irq, tcap,pe c in 8 pf input low voltage 0.2 v dd v il pa0-7, pb0-7,pc0-7, pd0-7, irq,reset,osc1, tcap v v ss ( i load = 10 ma) pc0-7 pe 1 i in m a pe c in 8 pf low voltage programming inhibit v lvpi v 3.5 low voltage programming recover 4.5 v lvpr v low voltage programming inhibit/recover hysteresis 1.0 h lvpi v 0.1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 47 section 9: electrical specifications mc68HC05C5 specification rev. 1.2 9.4 control timing (v dd = 5.0 vdc 10%, v ss = 0 vdc, t a = -40 c to +85 c, unless otherwise noted) * the minimum period t ilil should not be less than the number of cycle times it takes to execute the interrupt service routine plus 21 t cyc . unit max min symbol characteristic frequency of operation 4.2 f osc crystal option mhz 4.2 dc f osc external clock option mhz internal operating frequency 2.1 f op crystal (f osc ? 2) mhz 2.1 dc f op external clock (f osc ? 2) mhz cycle time 480 t cyc ns crystal oscillator start-up time 100 t oxov ms stop recovery start-up time (crystal oscillator) 100 t ilch ms reset pulse width 1.5 t rl t cyc interrupt pulse width low (edge-triggered) 125 t ilih ns interrupt pulse period * t ilil t cyc 90 t oh ,t ol ns osc1 pulse width 15.0 t epgm ms eeprom byte programming time 15.0 t ebyt ms eeprom byte erase time 100.0 t ebulk ms eeprom bulk erase time 10.0 t fpv m s eeprom programming voltage fall time 5.0 t rcon m s rc oscillator stabilization time (eeprom) normal operation 30.0 t eblock ms eeprom block erase time after lvpi set t fpvl 10.0 m s 0.05 t vddr v /m s v dd slew rate rising falling t vddf 0.1 v /m s f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 48 section 9: electrical specifications mc68HC05C5 specification rev. 1.2 control timing 1ffe 1ffe 1ffe 1ffe 1fff 4 t rl t ilih osc1 1 reset irq 2 irq 3 internal clock internal address bus t ilch 4064 t cyc notes: 1. represents the internal gating of the osc1 pin 2. irq pin edge-sensitive mask option. 3. irq pin level and edge-sensitive mask option. 4. reset vector address shown for timing example. reset or interrupt vector fetch figure 9-1: stop recovery timing diagram t v ddf t vddr v lvpi v lvpr t fpvl v dd lvpi (internal) v pp (internal) cpen cpen cannot be written to "1" cpen can now be written to "1" 20v figure 9-2: lvpi timing diagram f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 49 section 9: electrical specifications mc68HC05C5 specification rev. 1.2 9.5 siop timing (v dd = 5.0 vdc 10%, v ss = 0 vdc, t a = -40 c to +85 c, unless otherwise noted) notes: 1. f op = 2.1 mhz max. sdo bit 0 bit 1 bit 6 sck bit 7 sdi bit 0 bit 1 bit 6 bit 7 1 2 3 4 5 6 figure 9-3: siop timing diagram note: clock polarity (cpol) = 1 and data lsb first shown for example only. unit max min symbol characteristic operating frequency 0.25 dc f op ( m ) master f op 0.25 dc f op ( s ) slave f op cycle time 4.0 4.0 t cyc ( m ) master t cyc 4.0 t cyc ( s ) slave t cyc clock (sck) low time 932 t cyc ns sdo data valid time 200 t v ns sdo hold time 0 t ho ns sdi setup time 100 t s ns sdi hold time 100 t h ns num. 2 3 4 5 6 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 50 section 9: electrical specifications mc68HC05C5 specification rev. 1.2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 51 section 10: mechanical specifications mc68HC05C5 specification rev. 1.2 section 10 mechanical specifications 10.1 40-pin dual inline package 1 2 3 4 5 6 7 8 9 10 11 12 13 14 27 28 29 30 31 32 33 34 35 36 37 38 39 40 v dd osc1 osc2 tcap pd7 pd6/tcmp pd5 pd4 pd3 pd2 pd1 pd0 pc0 pc1 reset irq pe pa7 pa5 pa4 pa3 pa2 pa1 pa0 pb0 pb1 pb2 pa6 15 16 17 18 19 20 21 22 23 24 25 26 pc2 pc3 pc4 pc5 pc6 pc7 pb3 pb4 sdo/pb5 sdi/pb6 v ss sck/pb7 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
page 52 section 10: mechanical specifications mc68HC05C5 specification rev. 1.2 10.2 44-pin plcc package n c 34 39 pd7 pd6/tcmp pd5 pd4 pd3 pd2 pd1 pd0 pc0 pc1 29 pc2 7 12 pa5 pa4 pa3 pa2 pa1 pa0 pb0 pb1 pb2 17 pb3 pb4 18 23 28 640 1 npvppp ppnpp p r o p p iv o n cb 5 b 6 b 7 s s cc 7 c 6 c 5 c 4 c 3 c a 6 a 7e r q e s e d d s c 1 s c t *2 t c a p / s d o / s d i / s c k f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .


▲Up To Search▲   

 
Price & Availability of 68HC05C5

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X